﻿var titBook = titBook || {};
titBook.viewModels = titBook.viewModels || {};

(function(viewModels, proxy) {
    viewModels.LeftMenuViewModel = kendo.data.ObservableObject.extend({
        init: function(dataUpdatedCallback) {
            var me = this;
            kendo.data.ObservableObject.fn.init.call(me, {});

            me.dataUpdatedCallback = dataUpdatedCallback;
            me.getData(dataUpdatedCallback);
        },

        dataUpdatedCallback: undefined,

        getData: function(successCallback) {
            proxy.sendRequest("GetLeftMenuItems", titBook.core.constants.httpVerbs.get, successCallback);
        }
    });
})(titBook.viewModels, titBook.core.proxy);